namespace Is
{
    public static class IsDoubleFluentExtensions
    {
        public static bool Equal(this IIs<double> should, double expected, double tolerance)
        {
            return should.Apply(
                t => Core.Is.Equal(t, expected, tolerance),
                t => Core.Is.NotEqual(t, expected, tolerance)
            );
        }

        public static bool Zero(this IIs<double> iser)
        {
            return iser.Apply(
                t => Core.Is.Equal(t, 0),
                t => Core.Is.NotEqual(t, 0));
        }

        public static bool Positive(this IIs<double> iser)
        {
            return iser.Apply(
                t => Core.Is.GreaterThan(t, 0),
                t => Core.Is.LessThanOrEqual(t, 0));
        }

        public static bool Negative(this IIs<double> iser)
        {
            return iser.Apply(
                t => Core.Is.LessThan(t, 0),
                t => Core.Is.GreaterThanOrEqual(t, 0));
        }
    }
}